// 一体化相关接口
export const HealthApis = {
  // ---------------------------------------------- 公共
  // 获取主账户信息
  getMainAccount: 'get /app/user',
  // 获取体检人本人用户信息
  getExamUser: 'get /enterprise/exam/examinee/self',
  // 获取C端体检人本人信息
  getUser: 'get /examinee/self/detail',
  // 获取体检人列表(包含本人)
  getExamineeList: 'get /examinee/list',
  // 获取体检人信息
  getExamineeInfo: (id) => `get /examinee/${id}`,
  // 获取客服配置信息 { hospitalId }
  getServiceConfig: 'get /hospital/serviceTel',
  // 获取企业微信corpid
  getCorpId: 'post /getEnvironment',

  // ---------------------------------------------- 登录
  // 获取站点信息（调用在store中） {site}站点名
  getProfile: 'get /profile',
  // 获取渠道id,name,公司id,name
  // getHospitalAndCompanyFromSite: (params) =>
  //   `get /hospital/getHospitalAndCompanyFromSite?_site=${params._site}&newCompanyId=${params.newCompanyId}`,
  getHospitalAndCompanyFromSite: 'get /hospital/getHospitalAndCompanyFromSite',
  // 登录出
  logout: 'get /logout',
  // 反馈 { mobile, content };
  feedback: 'post /feedback',
  // 验证是否登录
  validateLogin: 'get /validateLogin',
  // 获取验证码 {scene}发送验证码的场景值（登录是6） {mobile}手机号
  mobileValidationCode: 'post /mobileValidationCode',
  // 手机号登录 {mobile}手机号 {validationCode}验证码
  loginByMobile: 'post /loginByMobile',
  // 客户端免密登录
  loginByClient: 'post /loginSSO',
  // 58 SSO 自动登录
  loginWithUid: 'post loginWithUid',
  // 58 SSO 登录
  loginByMobileWithUid: 'post loginByMobileWithUid',
  // 查询登录的用户的企业认证记录
  getCustomerCompanyLogs: 'get /enterprise/getCustomerCompanyLogs',
  // 获取渠道单位配置信息 { newCompanyId }
  showEmployeeExamTemplateInfo: 'get /showEmployeeExamTemplateInfo',
  // 换绑手机号 { validationCode, mobile }
  bindMobile: 'get /bindMobile',
  // 阳光免密登录
  sinosigLogin: 'post /loginRegistrationSSO',

  // ---------------------------------------------- 企业微信
  bindingOpenCode: 'post /bindingOpenCode',

  // ---------------------------------------------- 员工认证
  // 【NEW】根据证件号查询体检人 {keyWord}体检人证件号
  showCompanyExaminers: 'get /showCompanyExaminers',
  // 【NEW】根据体检人信息查询企业绑定记录 {examineeId}体检人id
  getCustomerCompanyLogsByExamineeId: 'get /enterprise/getCustomerCompanyLogsByExamineeId',
  // 【NEW】企业认证 {examineeId}体检人id {idCardToBindCard}用于查询并绑定体检卡的证件号
  examineeCertification: 'post /enterprise/examineeCertification',
  // 【NEW】新增体检人
  singleImportExaminee: 'post /singleImportExaminee',

  // ---------------------------------------------- 首页
  // 【NEW】查询可用的体检卡
  getValidUserCardsForAccount: 'get /card/getValidUserCardsForAccount',
  // 【NEW】绑定单个体检卡接口 {type}1点击卡，2点击订单，乐荐医流程传1 {uniqueNum}唯一编号，订单号或者体检卡ID，乐荐医流程传卡ID
  bindCardOrOrder: 'post /bindCardOrOrder',
  // 绑定所有体检卡接口
  bindAllCards: 'get /card/bindAllCards',
  // 【NEW】查询报告数量
  getReportNumber: 'get /examreport/number',
  // 【NEW】无体检卡提示
  hasCardOrder: 'get /card/hasCardOrder',
  // 领取自如私有活动接口
  receivePrivateCards: 'get /cardTemplate/receivePrivateCards',
  // 通过渠道获取活动id
  siteActivityId: 'get /enterprise/exam/home/',

  // ---------------------------------------------- 确认体检人信息
  // 【NEW】更新体检卡体检人接口 Content-Type: application/x-www-form-urlencoded
  //（可使用dataType: default） {cardId}编辑的卡ID，必须 {newName}姓名，必须 {newMobile}手机号，必须
  updateCardExaminee: 'post /card/updateCardExaminee',
  updateSelfExamineeAndAllCard: 'post /card/updateSelfExamineeAndAllCard',

  // ---------------------------------------------- 选择机构&城市
  // 【NEW】查询城市列表  {cardId}体检卡ID，必须 {standardMealId}标准套餐ID，非必须
  getCityList: 'get /enterprise/exam/city/list',
  // 【NEW】查询体检品牌列表 {cardId}体检卡ID，必须 {city}体检城市，非必须 {standardMealId}标准套餐ID，非必须
  getBrandList: 'get /enterprise/exam/brand/list',
  // 【NEW】查询体检医院列表 {cardId}体检卡ID，必须 {city}体检城市，非必须 {standardMealId}标准套餐ID，非必须 {brandId}品牌ID，非必须
  getHospitalList: 'get /enterprise/exam/hospital/list',

  // 获取分院信息 { hospitalId }
  getHospitalHomePage: 'get /channelSite/getHospitalHomePage',

  // -----------------------------------------套餐列表
  // 【NEW】查询体检套餐列表 {cardId}体检卡ID，必须 {city}体检城市，非必须 {hospitalId}分院ID，非必须 {brandId}品牌ID，非必须
  getMealList: 'get /enterprise/exam/meal/list',
  //套餐详情
  getStandardMealDetail: (id) => `get /enterprise/exam/meal/standardMeal/${id}/detail`,
  getPlatformMealDetail: (id) => `get /enterprise/exam/meal/platformMeal/${id}/detail`,

  // ------------------------------------------家属体检人
  // 校验身份证能否绑定 {name, mobile, idCard, addAccountTYpe, gender,
  // marruageStatus, nationality, examineeFrom, birthYear, dateBirth} dataType: json
  verifyIdCard: 'post /examinee/check/complete',
  // 保存体检人 {name, mobile, idCard, addAccountTYpe, gender,
  // marruageStatus, nationality, examineeFrom, birthYear, dateBirth} dataType: json
  saveExaminee: 'post /examinee/save',
  // 更新体检人 body:{id, name, mobile, idCard, addAccountTYpe, gender,
  // marruageStatus, nationality, examineeFrom, birthYear, dateBirth} param:{isExamReportEntry} dataType: json
  updateExaminee: 'post /examinee/update',
  // 删除体检人，调用方式: this.$apis.deleteExaminee(id)({ dataType: 'default' })
  deleteExaminee: (id) => `post /examinee/remove/${id}`,

  // ---------------------------------------------- 体检卡
  // 获取卡列表
  getUserCardPage: 'get /loadUserCardPage',

  // --------------------------------------------定制加项包
  getRecommendList: 'get /meal/recommend/relations',

  // --------------------------------------------自费加项包
  listSelfPayExamItemPackages: 'post /meal/listSelfPayExamItemPackages',

  // --------------------------------------------加项包选择数量超出提示
  getReasonRemind: 'post /meal/getReasonRemind',

  // 选择加项包并算价格 {orderId, mealId, removePackageId, itemIds, packageIds,
  // packageItemIds, chooseCardId, mealMultiChooseParams} dataType: json
  selectPackage: 'post /meal/selectPackage',

  // --------------------------------------------选择日期
  // { examCompanyId, channelCompanyId, mealId, cardId, choseDay,
  // infoDay, start: 'yyyy-MM-dd', end:'yyyy-MM-dd', isInLocation:, itemIds:, packageIds: , gender,}
  queryDateUnit: 'post /order/dateUnit',

  // --------------------------------------------支付流程
  // 获取下单页所需的各种配置
  getSettings: 'get /orderSubmit/getSettings',
  // 下单页获取体检人列表以及套餐婚姻属性
  getExaminerList: 'post /orderSubmit/examiners',
  // 下单页获取套餐信息
  getMealInfo: 'post /orderSubmit/mealInfo',
  // 获取支付价格、红包、优惠券等信息
  getPayAccounts: 'post /orderSubmit/payAccounts',
  // 获取所有的支付方式信息
  getPayMethods: 'post /orderSubmit/getPayMethods',
  // 校验当前选择的日期是否可用
  verifySameAccountOrder: 'get /order/verifySameAccountOrder',
  // 下单接口
  orderBook: 'post /order/book',
  // 支付接口
  orderpayment: 'post /orderpayment',
  // 订单状态接口
  getOrderStatus: 'get /order/orderStatusCheck',

  // --------------------------------------------订单
  // 获取订单详情
  getOrderDetail: (id) => `get /mobileOrderDetailsPage/${id}`,
  // 订单列表
  getOrderList: 'post /orderListPage',
  // 订单取消
  revokeOrder: (id) => `post /order/revokeOrder/${id}`,
  // 订单改期
  changeDate: `post /order/changeDate`,
  // 报告授权
  reportAuth: `get /examreport/auth`,
  // 渠道模板
  mobileMainPage: `get /mobileMainPage`,

  // 获取卡详情
  getCardDetail: (cardId) => `get /card/detail/?cardId=${cardId}`,
  // 根据发票抬头id查询发票抬头信息接口
  getReimbursementTitle: (newCompanyId) => `get /reimbursement/title?companyId=${newCompanyId}`,
  // 用户申请报销接口
  reimbursementApply: 'post /reimbursement/apply',
  // 用户端根据用户id和报销单号查询发票详情接口
  reimbursementDetail: (id) => `get /reimbursement/detail?reimbursementId=${id}`,
  // 用户端根据用户id获取用户报销列表接口
  reimbursementList: (userId) => `get /reimbursement/list?${userId}`,
  // 上传图片返回图片地址链接接口
  uploadImag: 'post /file/uploadImag',
  // --------------------------------------------满意度调查
  // 根据满意度问卷id获取问卷信息
  accountSatisfactionSurveyNew: `post /diagnosis/accountSatisfactionSurveyNew`,
  // 获取问题接口
  getQuestionAndAnswerByQuestionId: `get /diagnosis/getQuestionAndAnswerByQuestionId`,
  // 保存用户选择答案接口
  saveSatisfactionAnswers: `post /diagnosis/saveSatisfactionAnswers`,
  // 完成满意度答题接口
  finishSatisfactionSurvey: `post /diagnosis/finishSatisfactionSurvey`,
  // 智能推荐提交接口
  finishSurvey: `post /diagnosis/finishSurvey`,
  // 查询体检卡的问卷状态接口
  answerRecommendStatus: `get /answerRecommend/status`,
  // 获取智能推荐答案
  answerRecommendResult: `get /answerRecommend/result`,
  // 获取咨询列表
  getHealthConsultationList: 'post /app/content/getTopicArticle',
  // 获取咨询详情
  getHealthConsultationDetailNoLogin: 'get /app/content/getArticleDetailNoLogin',
  // 获取咨询详情
  getHealthConsultationDetail: 'get /app/content/getArticleDetail',

  // 满意度调查首页入口
  needSatisfactionSurvey: `get /diagnosis/needSatisfactionSurvey`,
  // 获取登陆账号用户信息
  getLoginAccountInfo: `get /enterprise/getLoginAccountInfo`,

  // -------------------------------------------- 活动领卡
  queryCanReceiveList: 'post /cardTemplate/queryCanReceiveList',
  boardingReceiveCards: 'post /cardTemplate/boardingReceiveCards',
  receiveCards: 'post /cardTemplate/receiveCards',
  // {cardCode, cardPassword}
  cardReceiveCards: 'post /card/receiveCards',
  // {activityId, genders, hospitalId, page: {}}
  getActivityListPage: 'post /activity/activityListPage',

  // -------------------------------------------- 开票
  // 是否可以开票
  getEnterprise: 'get /enterprise/exam/home/',
  // 申请开票
  orderInvoiceApply: 'post /orderInvoiceApply',
  // 根据订单号查询发票详情接口
  getInvoiceApply: 'get /getInvoiceApply',
  // 发票发送邮箱接口
  sendInvoiceEmail: 'get /sendInvoiceEmail',
};
